package demo1;

public class Bird extends Animal {
    @Override
    public void func() {
        if(this.name!=null){
            System.out.println(this.name+"可以飞！");
        } else {
            System.out.println("name为空");
        }
    }

    public Bird(int age, String name) {
        super(age, name);
        System.out.println("调用Bird类构造方法");
    }
}
